home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Larry Weiss <lfw@iadfw.net>
- Newsgroups: comp.lang.c
- Subject: Re: Borland C's tmpnam()
- Date: Sat, 23 Mar 1996 21:26:23 -0600
- Organization: customer of Internet America
- Message-ID: <3154C0DF.6E90@iadfw.net>
- References: <AD75E5DC9668E2A52@mcdiala13.it.luc.edu> <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu> <AD78E5E796681EC58@mcdialb10.it.luc.edu> <827626790snz@genesis.demon.co.uk>
- NNTP-Posting-Host: dal12-25.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (Win16; I)
-
- Lawrence Kirby wrote:
- >
- > In article <AD78E5E796681EC58@mcdialb10.it.luc.edu>
- > VArase@varase.it.luc.edu "Verne Arase" writes:
- >
- > >In article <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu>,
- > >The Amorphous Mass <robinson@blue.weeg.uiowa.edu> wrote:
- > >
- > > >> The online documentation (all I have) says that it returns a file name
- > > >> "which can be safely used as the name of a temporary file".
- > > >> What does this mean?
- > > > It means that it generates a filename that is guaranteed to be unique
- > > >-- ie it won't overwrite an existing file.
- > >
- >
- > >The other response I mentioned said that (_my synopsis_) all it guaranteed
- > >was that the provided file name is compatible with your file system.
- >
- > That is wrong. The standard says (7.9.9.4)
- >
- > "The tempnam function generates a string that is a valid file name and that
- > is not the name of an existing file."
- >
-
- I might have written the Standard to say "not the name of an existing file at
- the time that the name was created". There is no guarantee that that particular
- name is somehow reserved against future use by other processes that may be competing
- with your C based process for file names. Or am I wrong? (in other words if
- your process doesn't hurry to open a file with that name, then all bets are off
- about that name already being used to represent an existing file).
-